<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>p4vasp.cmatrix</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="p4vasp-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="../index.html">p4vasp</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="p4vasp-module.html">Package&nbsp;p4vasp</a> ::
        Module&nbsp;cmatrix
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="p4vasp.cmatrix-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module cmatrix</h1><p class="nomargin-top"><span class="codelink"><a href="p4vasp.cmatrix-pysrc.html">source&nbsp;code</a></span></p>
<pre class="literalblock">

Basic *Vector* and *Matrix* manipulation library.
This module defines objects *Vector* and *Matrix* with (almost)
the same api as the matrix.py, but cmatrix.py uses functions written in C.
The other difference is, that it is restricted to 3d vectors and matrices only.

There are two reasons to use this module:

  * performance - the performance of *cmatrix* can be from 1.5 up to more than 10 times
    better than for the *matrix* (depending on the operation)

  * *cmatrix* can provide a convenient interface to other 3d vector-based
    objects implemented in C.

Objects *Matrix* and *Vector* are instances of the corresponding objects
from the *matrix* module.
Objects of *cmatrix* can interact with the *matrix* objects - mixed types
can be used in operations.

Limitations:

  * only 3d objects,

  * only *float* (double) type.

Bugs: Sometimes the objects needs to be deleted explicitely by *del* statement
in order to avoid exceptions.

</pre>

<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Classes"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="p4vasp.cmatrix.Vector-class.html" class="summary-name">Vector</a><br />
      3D Vector object implemented using c-functions.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="p4vasp.cmatrix.Matrix-class.html" class="summary-name">Matrix</a><br />
      3D Matrix object implemented using c-functions.
    </td>
  </tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="isCMatrix"></a><span class="summary-sig-name">isCMatrix</span>(<span class="summary-sig-arg">obj</span>)</span><br />
      Check whether *obj* is a *Matrix* from *cmatrix* module.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="p4vasp.cmatrix-pysrc.html#isCMatrix">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="isCVector"></a><span class="summary-sig-name">isCVector</span>(<span class="summary-sig-arg">obj</span>)</span><br />
      Check whether *obj* is a *Vector* from *cmatrix* module.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="p4vasp.cmatrix-pysrc.html#isCVector">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="isMatrix"></a><span class="summary-sig-name">isMatrix</span>(<span class="summary-sig-arg">obj</span>)</span><br />
      Check whether *obj* is a *Matrix* .</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="p4vasp.cmatrix-pysrc.html#isMatrix">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="isVector"></a><span class="summary-sig-name">isVector</span>(<span class="summary-sig-arg">obj</span>)</span><br />
      Check whether *obj* is a *Vector* .</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="p4vasp.cmatrix-pysrc.html#isVector">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="p4vasp.cmatrix-module.html#Rx" class="summary-sig-name">Rx</a>(<span class="summary-sig-arg">w</span>=<span class="summary-sig-default">0</span>)</span><br />
      Return matrix of rotation around x axis.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="p4vasp.cmatrix-pysrc.html#Rx">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="p4vasp.cmatrix-module.html#Ry" class="summary-sig-name">Ry</a>(<span class="summary-sig-arg">w</span>=<span class="summary-sig-default">0</span>)</span><br />
      Return matrix of rotation around y axis.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="p4vasp.cmatrix-pysrc.html#Ry">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="p4vasp.cmatrix-module.html#Rz" class="summary-sig-name">Rz</a>(<span class="summary-sig-arg">w</span>=<span class="summary-sig-default">0</span>)</span><br />
      Return matrix of rotation around z axis.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="p4vasp.cmatrix-pysrc.html#Rz">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="p4vasp.cmatrix-module.html#rotmat" class="summary-sig-name">rotmat</a>(<span class="summary-sig-arg">x</span>,
        <span class="summary-sig-arg">y</span>,
        <span class="summary-sig-arg">z</span>,
        <span class="summary-sig-arg">a</span>=<span class="summary-sig-default">None</span>)</span><br />
      Return matrix of rotation around (x,y,z) axis.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="p4vasp.cmatrix-pysrc.html#rotmat">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="StringTypes"></a><span class="summary-name">StringTypes</span> = <code title="StringType, UnicodeType">StringType, UnicodeType</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="ex"></a><span class="summary-name">ex</span> = <code title="Vector(1., 0., 0.)">Vector(1., 0., 0.)</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="ey"></a><span class="summary-name">ey</span> = <code title="Vector(0., 1., 0.)">Vector(0., 1., 0.)</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="ez"></a><span class="summary-name">ez</span> = <code title="Vector(0., 0., 1.)">Vector(0., 0., 1.)</code>
    </td>
  </tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Function Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-FunctionDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="Rx"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">Rx</span>(<span class="sig-arg">w</span>=<span class="sig-default">0</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="p4vasp.cmatrix-pysrc.html#Rx">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Return matrix of rotation around x axis. Parameter *w* is in 
  radians.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="Ry"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">Ry</span>(<span class="sig-arg">w</span>=<span class="sig-default">0</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="p4vasp.cmatrix-pysrc.html#Ry">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Return matrix of rotation around y axis. Parameter *w* is in 
  radians.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="Rz"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">Rz</span>(<span class="sig-arg">w</span>=<span class="sig-default">0</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="p4vasp.cmatrix-pysrc.html#Rz">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Return matrix of rotation around z axis. Parameter *w* is in 
  radians.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="rotmat"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">rotmat</span>(<span class="sig-arg">x</span>,
        <span class="sig-arg">y</span>,
        <span class="sig-arg">z</span>,
        <span class="sig-arg">a</span>=<span class="sig-default">None</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="p4vasp.cmatrix-pysrc.html#rotmat">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Return matrix of rotation around (x,y,z) axis. Parameter *a* is in 
  radians. If *a* is missing (or *None* ), then the length of the vector  
  (x,y,z) (in radians) specifies the rotation.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="p4vasp-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="../index.html">p4vasp</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Sun Aug 16 22:08:07 2015
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
